/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "namepublishedin")
@NamedQueries({
    @NamedQuery(name = "Namepublishedin.findAll", query = "SELECT n FROM Namepublishedin n"),
    @NamedQuery(name = "Namepublishedin.findByIdnamepublishedin", query = "SELECT n FROM Namepublishedin n WHERE n.idnamepublishedin = :idnamepublishedin"),
    @NamedQuery(name = "Namepublishedin.findByNamepublishedin", query = "SELECT n FROM Namepublishedin n WHERE n.namepublishedin = :namepublishedin")})
public class Namepublishedin implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idnamepublishedin")
    private Integer idnamepublishedin;
    @Column(name = "namepublishedin")
    private String namepublishedin;
    @OneToMany(mappedBy = "namepublishedin", fetch = FetchType.LAZY)
    private List<Taxonomicelement> taxonomicelementList;

    public Namepublishedin() {
    }

    public Namepublishedin(Integer idnamepublishedin) {
        this.idnamepublishedin = idnamepublishedin;
    }

    public Namepublishedin(Integer idnamepublishedin, String namepublishedin) {
        this.idnamepublishedin = idnamepublishedin;
        this.namepublishedin = namepublishedin;
    }

    public Integer getIdnamepublishedin() {
        return idnamepublishedin;
    }

    public void setIdnamepublishedin(Integer idnamepublishedin) {
        this.idnamepublishedin = idnamepublishedin;
    }

    public String getNamepublishedin() {
        return namepublishedin;
    }

    public void setNamepublishedin(String namepublishedin) {
        this.namepublishedin = namepublishedin;
    }

    public List<Taxonomicelement> getTaxonomicelementList() {
        return taxonomicelementList;
    }

    public void setTaxonomicelementList(List<Taxonomicelement> taxonomicelementList) {
        this.taxonomicelementList = taxonomicelementList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idnamepublishedin != null ? idnamepublishedin.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Namepublishedin)) {
            return false;
        }
        Namepublishedin other = (Namepublishedin) object;
        if ((this.idnamepublishedin == null && other.idnamepublishedin != null) || (this.idnamepublishedin != null && !this.idnamepublishedin.equals(other.idnamepublishedin))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Namepublishedin[idnamepublishedin=" + idnamepublishedin + "]";
    }

}
